import { Component, Input, OnInit, ViewChild } from '@angular/core';
import { StorageListComponent } from '../storage-list/storage-list.component';
import { TallyListComponent } from '../tally-list/tally-list.component';

@Component({
  selector: 'app-bill-detail',
  templateUrl: './bill-detail.component.html',
  styleUrls: ['./bill-detail.component.less']
})
export class BillDetailComponent implements OnInit {

	@Input()
	record: any;

	selectedStorageId: string = '';

	@ViewChild('storageList')
	storageListComponent: StorageListComponent;

	@ViewChild('tallyList')
	tallyListComponent: TallyListComponent;

	constructor(
	) {
	}

	ngOnInit(): void {
	}


	onOutPutStorageId(data: string) {
		this.selectedStorageId = data;
		this.tallyListComponent.loadData(this.selectedStorageId);
	}
}
